<body>

	<!-- TOP BAR -->
	<div id="top-bar">
		
		<div class="page-full-width cf">

			<ul id="nav" class="fl">
	
				<li class="v-sep"><?=anchor('home/index','Xem website',array('class'=>'round button dark ic-left-arrow image-left','target'=>'_blank'));?></li>
				<li class="v-sep"><a href="#" class="round button dark menu-user image-left">Chào <strong>admin</strong></a>
					<ul>						
						<li><a href="<?=site_url('admin/settings') ?>">Thông tin cửa hàng</a></li>
						<li><a href="<?=site_url('admin/password') ?>">Thay đổi mật khẩu</a></li>
						<li><?=anchor('admin/logout','Thoát') ?></li>
					</ul> 
				</li>
			
				<!--<li><a href="#" class="round button dark menu-email-special image-left">3 new messages</a></li>-->
				<li><?=anchor('admin/logout','Thoát',array('class'=>'round button dark menu-logoff image-left')); ?></li>
				
			</ul> <!-- end nav -->

					
			<form action="#" method="POST" id="search-form" class="fr">
				<fieldset>
					<input type="text" id="search-keyword" class="round button dark ic-search image-right" placeholder="Search..." />
					<input type="hidden" value="SUBMIT" />
				</fieldset>
			</form>

		</div> <!-- end full-width -->	
	
	</div> <!-- end top-bar -->
	
	
	
	<!-- HEADER -->
	<div id="header-with-tabs">
		
		<div class="page-full-width cf">
	
			<ul id="tabs" class="fl">
				<li><?=anchor('admin/index','Sản phẩm'); ?></li>
				<li><?=anchor('admin/categories','Danh mục'); ?></a></li>
				<li><?=anchor('admin/ads','Quảng cáo',array('class'=>'active-tab'))?></li>
			</ul> <!-- end tabs -->
			
			<!-- Change this image to your own company's logo -->
			<!-- The logo will automatically be resized to 30px height. -->
			<a href="#" id="company-branding-small" class="fr"><img src="<?=base_url($template_path.'images/company-logo.png') ?>" alt="Blue Hosting" /></a>
			
		</div> <!-- end full-width -->	

	</div> <!-- end header -->
	
	
	
	<!-- MAIN CONTENT -->
	<div id="content">
		
		<div class="page-full-width cf">

			<div class="content-module">
			
				<div class="content-module-heading cf">
				
					<h3 class="fl">Quảng cáo</h3>
					<span class="fr expand-collapse-text">Thu nhỏ</span>
					<span class="fr expand-collapse-text initial-expand">Mở rộng</span>
				
				</div> <!-- end content-module-heading -->
				
				
				<div class="content-module-main">


						<?php 
							if( isset($notify) && !empty($notify) ):
						?>
						<div class="content-module-main">
							<div class="confirmation-box round"><?=$notify; ?></div>
						</div> <!-- end content-module-main -->
						<?php
							endif;
						?>			

					<ul class="temporary-button-showcase">
							<li><?=anchor('admin/addNewAd','Thêm quảng cáo mới',array('class'=>'button round blue image-right ic-add text-upper')) ?></li>							
					</ul>			
				
					<p>Hiển thị quảng cáo [slide hình] trên trang</p>										
					
					<table>
					
						<thead>
					
							<tr>
								<th><input type="checkbox" id="table-select-all"></th>
								<th>Hình ảnh</th>
								<th>Mô tả 1</th>
								<th>Mô tả 2</th>
								<th>Actions</th>
							</tr>
						
						</thead>						
						
						<tbody>
						<?php
							foreach ($ads as $ad):								
						?>	
							<tr>
								<td><input type="checkbox"></td>
								<td><img src="<?=base_url('upload/image/ads/'.$ad['image']) ?>" width="300" height="120" /></td>
								<td><?=$ad['title'] ?></td>
								<td><?=$ad['href'] ?></td>
								<td>
									<a href="<?=site_url('admin/editAd/'.$ad['id']) ?>" class="table-actions-button ic-table-edit"></a>
									<a href="<?=site_url('admin/deleteAd/'.$ad['id']) ?>" class="table-actions-button ic-table-delete" onClick="return confirm('Bạn có chắc sẽ xóa quảng cáo này không?')"></a>
								</td>
							</tr>							
						<?php
							endforeach;
						?>
						</tbody>
						
					</table>
					
					<div class="stripe-separator"><!--  --></div>
					
					<p>Giao diện responsive</p>
					
				</div> <!-- end content-module-main -->
			
			</div> <!-- end content-module -->
		
		</div> <!-- end full-width -->
			
	</div> <!-- end content -->